/**
 */
package gatperdut.chato.model.Chato.Constant.impl;

import gatperdut.chato.model.Chato.ChatoPackage;
import gatperdut.chato.model.Chato.Constant.ConstantFactory;
import gatperdut.chato.model.Chato.Constant.ConstantPackage;
import gatperdut.chato.model.Chato.Constant.CraftCategory;
import gatperdut.chato.model.Chato.Constant.CraftImplementLocation;
import gatperdut.chato.model.Chato.Constant.Fluid;
import gatperdut.chato.model.Chato.Constant.Gender;
import gatperdut.chato.model.Chato.Constant.Language;
import gatperdut.chato.model.Chato.Constant.Score;
import gatperdut.chato.model.Chato.Constant.Skill;
import gatperdut.chato.model.Chato.Constant.WearLoc;
import gatperdut.chato.model.Chato.Container.ContainerPackage;
import gatperdut.chato.model.Chato.Container.impl.ContainerPackageImpl;
import gatperdut.chato.model.Chato.Craft.CraftPackage;
import gatperdut.chato.model.Chato.Craft.impl.CraftPackageImpl;
import gatperdut.chato.model.Chato.Entity.EntityPackage;
import gatperdut.chato.model.Chato.Entity.Skill.SkillPackage;
import gatperdut.chato.model.Chato.Entity.Skill.impl.SkillPackageImpl;
import gatperdut.chato.model.Chato.Entity.impl.EntityPackageImpl;
import gatperdut.chato.model.Chato.Item.ItemPackage;
import gatperdut.chato.model.Chato.Item.impl.ItemPackageImpl;
import gatperdut.chato.model.Chato.Player.PlayerPackage;
import gatperdut.chato.model.Chato.Player.impl.PlayerPackageImpl;
import gatperdut.chato.model.Chato.Room.RoomPackage;
import gatperdut.chato.model.Chato.Room.impl.RoomPackageImpl;
import gatperdut.chato.model.Chato.Util.UtilPackage;
import gatperdut.chato.model.Chato.Util.impl.UtilPackageImpl;
import gatperdut.chato.model.Chato.impl.ChatoPackageImpl;
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EPackageImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Package</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class ConstantPackageImpl extends EPackageImpl implements ConstantPackage {
	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private EEnum genderEEnum = null;

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private EEnum languageEEnum = null;

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private EEnum fluidEEnum = null;

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private EEnum craftCategoryEEnum = null;

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private EEnum craftImplementLocationEEnum = null;

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private EEnum wearLocEEnum = null;

	/**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private EEnum skillEEnum = null;

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private EEnum scoreEEnum = null;

    /**
     * Creates an instance of the model <b>Package</b>, registered with
     * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
     * package URI value.
     * <p>Note: the correct way to create the package is via the static
     * factory method {@link #init init()}, which also performs
     * initialization of the package, or returns the registered package,
     * if one already exists.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @see org.eclipse.emf.ecore.EPackage.Registry
     * @see gatperdut.chato.model.Chato.Constant.ConstantPackage#eNS_URI
     * @see #init()
     * @generated
     */
	private ConstantPackageImpl() {
        super(eNS_URI, ConstantFactory.eINSTANCE);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private static boolean isInited = false;

	/**
     * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
     * 
     * <p>This method is used to initialize {@link ConstantPackage#eINSTANCE} when that field is accessed.
     * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @see #eNS_URI
     * @see #createPackageContents()
     * @see #initializePackageContents()
     * @generated
     */
	public static ConstantPackage init() {
        if (isInited) return (ConstantPackage)EPackage.Registry.INSTANCE.getEPackage(ConstantPackage.eNS_URI);

        // Obtain or create and register package
        ConstantPackageImpl theConstantPackage = (ConstantPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ConstantPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ConstantPackageImpl());

        isInited = true;

        // Obtain or create and register interdependencies
        ChatoPackageImpl theChatoPackage = (ChatoPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ChatoPackage.eNS_URI) instanceof ChatoPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ChatoPackage.eNS_URI) : ChatoPackage.eINSTANCE);
        PlayerPackageImpl thePlayerPackage = (PlayerPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(PlayerPackage.eNS_URI) instanceof PlayerPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(PlayerPackage.eNS_URI) : PlayerPackage.eINSTANCE);
        EntityPackageImpl theEntityPackage = (EntityPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EntityPackage.eNS_URI) instanceof EntityPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EntityPackage.eNS_URI) : EntityPackage.eINSTANCE);
        SkillPackageImpl theSkillPackage = (SkillPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SkillPackage.eNS_URI) instanceof SkillPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SkillPackage.eNS_URI) : SkillPackage.eINSTANCE);
        RoomPackageImpl theRoomPackage = (RoomPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(RoomPackage.eNS_URI) instanceof RoomPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(RoomPackage.eNS_URI) : RoomPackage.eINSTANCE);
        ItemPackageImpl theItemPackage = (ItemPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ItemPackage.eNS_URI) instanceof ItemPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ItemPackage.eNS_URI) : ItemPackage.eINSTANCE);
        ContainerPackageImpl theContainerPackage = (ContainerPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ContainerPackage.eNS_URI) instanceof ContainerPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ContainerPackage.eNS_URI) : ContainerPackage.eINSTANCE);
        CraftPackageImpl theCraftPackage = (CraftPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CraftPackage.eNS_URI) instanceof CraftPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CraftPackage.eNS_URI) : CraftPackage.eINSTANCE);
        UtilPackageImpl theUtilPackage = (UtilPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(UtilPackage.eNS_URI) instanceof UtilPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UtilPackage.eNS_URI) : UtilPackage.eINSTANCE);

        // Create package meta-data objects
        theConstantPackage.createPackageContents();
        theChatoPackage.createPackageContents();
        thePlayerPackage.createPackageContents();
        theEntityPackage.createPackageContents();
        theSkillPackage.createPackageContents();
        theRoomPackage.createPackageContents();
        theItemPackage.createPackageContents();
        theContainerPackage.createPackageContents();
        theCraftPackage.createPackageContents();
        theUtilPackage.createPackageContents();

        // Initialize created meta-data
        theConstantPackage.initializePackageContents();
        theChatoPackage.initializePackageContents();
        thePlayerPackage.initializePackageContents();
        theEntityPackage.initializePackageContents();
        theSkillPackage.initializePackageContents();
        theRoomPackage.initializePackageContents();
        theItemPackage.initializePackageContents();
        theContainerPackage.initializePackageContents();
        theCraftPackage.initializePackageContents();
        theUtilPackage.initializePackageContents();

        // Mark meta-data to indicate it can't be changed
        theConstantPackage.freeze();

  
        // Update the registry and return the package
        EPackage.Registry.INSTANCE.put(ConstantPackage.eNS_URI, theConstantPackage);
        return theConstantPackage;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EEnum getGender() {
        return genderEEnum;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EEnum getLanguage() {
        return languageEEnum;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EEnum getFluid() {
        return fluidEEnum;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EEnum getCraftCategory() {
        return craftCategoryEEnum;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EEnum getCraftImplementLocation() {
        return craftImplementLocationEEnum;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EEnum getWearLoc() {
        return wearLocEEnum;
    }

	/**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EEnum getSkill() {
        return skillEEnum;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EEnum getScore() {
        return scoreEEnum;
    }

    /**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public ConstantFactory getConstantFactory() {
        return (ConstantFactory)getEFactoryInstance();
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private boolean isCreated = false;

	/**
     * Creates the meta-model objects for the package.  This method is
     * guarded to have no affect on any invocation but its first.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void createPackageContents() {
        if (isCreated) return;
        isCreated = true;

        // Create enums
        genderEEnum = createEEnum(GENDER);
        languageEEnum = createEEnum(LANGUAGE);
        fluidEEnum = createEEnum(FLUID);
        craftCategoryEEnum = createEEnum(CRAFT_CATEGORY);
        craftImplementLocationEEnum = createEEnum(CRAFT_IMPLEMENT_LOCATION);
        wearLocEEnum = createEEnum(WEAR_LOC);
        skillEEnum = createEEnum(SKILL);
        scoreEEnum = createEEnum(SCORE);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private boolean isInitialized = false;

	/**
     * Complete the initialization of the package and its meta-model.  This
     * method is guarded to have no affect on any invocation but its first.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void initializePackageContents() {
        if (isInitialized) return;
        isInitialized = true;

        // Initialize package
        setName(eNAME);
        setNsPrefix(eNS_PREFIX);
        setNsURI(eNS_URI);

        // Initialize enums and add enum literals
        initEEnum(genderEEnum, Gender.class, "Gender");
        addEEnumLiteral(genderEEnum, Gender.MALE);
        addEEnumLiteral(genderEEnum, Gender.FEMALE);
        addEEnumLiteral(genderEEnum, Gender.UNKNOWN);

        initEEnum(languageEEnum, Language.class, "Language");
        addEEnumLiteral(languageEEnum, Language.WESTRON);
        addEEnumLiteral(languageEEnum, Language.ARNORIAN_TENGWAR);

        initEEnum(fluidEEnum, Fluid.class, "Fluid");
        addEEnumLiteral(fluidEEnum, Fluid.BEER);
        addEEnumLiteral(fluidEEnum, Fluid.OIL);
        addEEnumLiteral(fluidEEnum, Fluid.WINE);
        addEEnumLiteral(fluidEEnum, Fluid.WATER);

        initEEnum(craftCategoryEEnum, CraftCategory.class, "CraftCategory");
        addEEnumLiteral(craftCategoryEEnum, CraftCategory.GENERAL_HOUSE_KEEPING);
        addEEnumLiteral(craftCategoryEEnum, CraftCategory.GENERAL_COOKING);

        initEEnum(craftImplementLocationEEnum, CraftImplementLocation.class, "CraftImplementLocation");
        addEEnumLiteral(craftImplementLocationEEnum, CraftImplementLocation.ANYWHERE);
        addEEnumLiteral(craftImplementLocationEEnum, CraftImplementLocation.IN_ROOM);
        addEEnumLiteral(craftImplementLocationEEnum, CraftImplementLocation.IN_HAND);

        initEEnum(wearLocEEnum, WearLoc.class, "WearLoc");
        addEEnumLiteral(wearLocEEnum, WearLoc.LHAND);
        addEEnumLiteral(wearLocEEnum, WearLoc.RHAND);
        addEEnumLiteral(wearLocEEnum, WearLoc.FEET);
        addEEnumLiteral(wearLocEEnum, WearLoc.HEAD);
        addEEnumLiteral(wearLocEEnum, WearLoc.LWRIST);
        addEEnumLiteral(wearLocEEnum, WearLoc.RWRIST);
        addEEnumLiteral(wearLocEEnum, WearLoc.LANKLE);
        addEEnumLiteral(wearLocEEnum, WearLoc.RANKLE);

        initEEnum(skillEEnum, Skill.class, "Skill");
        addEEnumLiteral(skillEEnum, Skill.MEDIUM_EDGE);
        addEEnumLiteral(skillEEnum, Skill.LARGE_EDGE);
        addEEnumLiteral(skillEEnum, Skill.DODGE);
        addEEnumLiteral(skillEEnum, Skill.BLOCK);

        initEEnum(scoreEEnum, Score.class, "Score");
        addEEnumLiteral(scoreEEnum, Score.STRENGTH);
        addEEnumLiteral(scoreEEnum, Score.DEXTERITY);
        addEEnumLiteral(scoreEEnum, Score.CONSTITUTION);
        addEEnumLiteral(scoreEEnum, Score.INTELLIGENCE);
        addEEnumLiteral(scoreEEnum, Score.AGILITY);
        addEEnumLiteral(scoreEEnum, Score.WILLPOWER);
        addEEnumLiteral(scoreEEnum, Score.POWER);

        // Create annotations
        // aliases
        createAliasesAnnotations();
        // properties
        createPropertiesAnnotations();
        // ToHit
        createToHitAnnotations();
        // Dam
        createDamAnnotations();
        // WCarry
        createWCarryAnnotations();
    }

	/**
     * Initializes the annotations for <b>aliases</b>.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	protected void createAliasesAnnotations() {
        String source = "aliases";		
        addAnnotation
          (languageEEnum.getELiterals().get(0), 
           source, 
           new String[] {
             "alias0", "Westron",
             "alias1", "Common"
           });		
        addAnnotation
          (languageEEnum.getELiterals().get(1), 
           source, 
           new String[] {
             "alias0", "Arnorian-Tengwar"
           });							
    }

    /**
     * Initializes the annotations for <b>properties</b>.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    protected void createPropertiesAnnotations() {
        String source = "properties";				
        addAnnotation
          (fluidEEnum.getELiterals().get(0), 
           source, 
           new String[] {
             "density", "101",
             "flammable", "false"
           });		
        addAnnotation
          (fluidEEnum.getELiterals().get(1), 
           source, 
           new String[] {
             "density", "115",
             "flammable", "true"
           });		
        addAnnotation
          (fluidEEnum.getELiterals().get(2), 
           source, 
           new String[] {
             "density", "97",
             "flammable", "false"
           });		
        addAnnotation
          (fluidEEnum.getELiterals().get(3), 
           source, 
           new String[] {
             "density", "100",
             "flammable", "false"
           });			
    }

    /**
     * Initializes the annotations for <b>ToHit</b>.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    protected void createToHitAnnotations() {
        String source = "ToHit";								
        addAnnotation
          (scoreEEnum.getELiterals().get(0), 
           source, 
           new String[] {
             "1", "-5",
             "2", "-3",
             "3", "-3",
             "4", "-2",
             "5", "-2",
             "6", "-1",
             "7", "-1",
             "8", "0",
             "9", "0",
             "10", "0",
             "11", "0",
             "12", "0",
             "13", "0",
             "14", "1",
             "15", "1",
             "16", "2",
             "17", "2",
             "18", "3",
             "19", "3",
             "20", "4",
             "21", "4",
             "22", "5",
             "23", "5",
             "24", "6",
             "25", "7"
           });		
    }

    /**
     * Initializes the annotations for <b>Dam</b>.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    protected void createDamAnnotations() {
        String source = "Dam";									
        addAnnotation
          (scoreEEnum.getELiterals().get(0), 
           source, 
           new String[] {
             "1", "-5",
             "2", "-4",
             "3", "-4",
             "4", "-3",
             "5", "-3",
             "6", "-2",
             "7", "-1",
             "8", "0",
             "9", "0",
             "10", "0",
             "11", "0",
             "12", "0",
             "13", "1",
             "14", "2",
             "15", "2",
             "16", "3",
             "17", "4",
             "18", "4",
             "19", "5",
             "20", "6",
             "21", "6",
             "22", "7",
             "23", "8",
             "24", "8",
             "25", "9"
           });	
    }

    /**
     * Initializes the annotations for <b>WCarry</b>.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    protected void createWCarryAnnotations() {
        String source = "WCarry";										
        addAnnotation
          (scoreEEnum.getELiterals().get(0), 
           source, 
           new String[] {
             "1", "300",
             "2", "400",
             "3", "1500",
             "4", "3300",
             "5", "5000",
             "6", "6600",
             "7", "8000",
             "8", "10000",
             "9", "11500",
             "10", "13000",
             "11", "14000",
             "12", "15000",
             "13", "16500",
             "14", "18000",
             "15", "20500",
             "16", "23000",
             "17", "25500",
             "18", "28000",
             "19", "31000",
             "20", "34000",
             "21", "37500",
             "22", "41000",
             "23", "45500",
             "24", "50000",
             "25", "60000"
           });
    }

} //ConstantPackageImpl
